package cn.swu.ghx.swu.library.ui

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter
import cn.swu.ghx.swu.library.fragment.AcademyFragment
import cn.swu.ghx.swu.library.fragment.PhotoFragment
import cn.swu.ghx.swu.library.fragment.TeacherFragment

class FragmentAdapter(context:FragmentActivity) : FragmentStateAdapter(context) {

    val fragments = listOf(
        AcademyFragment(),
        TeacherFragment(),
        PhotoFragment(),
    )

    override fun getItemCount() = fragments.size

    override fun createFragment(position: Int): Fragment {
        return fragments.get(position)
    }
}